package exilim.exf1.cspacker.worker;

import java.io.File;

import javax.swing.SwingWorker;

import exilim.exf1.cspacker.CSPackerLogic;

/**
 * 
 * @author Janos
 * @version 15.08.2010 | 18:25:11
 * 
 */
public class ReadDirectoryWorker extends SwingWorker<File[], Void> {

	private final File selectedDirectory;

	public ReadDirectoryWorker(final File selectedDirectory) {
		this.selectedDirectory = selectedDirectory;
	}

	@Override
	protected File[] doInBackground() throws Exception {

		// Thread.sleep(2000);

		final File[] result = CSPackerLogic.getFileList(this.selectedDirectory);
		return result;
	}

}